
import request from '@/utils/request';


//分页查询
export function booklist(params){
      return request({
        url: '/dev-api/book/list',
        method: 'get',
        params
    })
}

//保存书籍
export function saveBook(data){
    return request({
        url: '/dev-api/book/save',
        method: 'post',
        data
    })
}

//删除书籍
export function deleteBook(id){
    return request({
        url: `/dev-api/book/delete/${id}`,
        method: 'delete',
    })
}


//获取书籍信息
export function getBookById(id){
    return request({
        url: `/dev-api/book/${id}`,
        method: 'get',
    })
}

//获取书籍图表数据--饼图
export function getBookChartPie(){
    return request({
        url: '/dev-api/book/echarts/pie',
        method: 'get',
    })
}

//获取书籍图表数据--柱状图
export function getBookChartBar() {
    return request({
        url: '/dev-api/book/echarts/bar',
        method: 'get',
    })
}


